from PyQt4 import QtCore, QtGui

class SliderWithLabels(QtGui.QWidget ):
    def __init__(self, leftLblValue="",centerLblValue="",rightLblValue=""):
        QtGui.QWidget.__init__(self)
        self.slider = QtGui.QSlider()
        self.slider.setOrientation(QtCore.Qt.Horizontal)
        self.leftLabel = QtGui.QLabel(self)
        self.leftLabel.setText(leftLblValue)
        self.centerLabel = QtGui.QLabel(self)
        self.centerLabel.setText(centerLblValue)
        self.centerLabel.setAlignment(QtCore.Qt.AlignCenter)
        self.rightLabel = QtGui.QLabel(self)
        self.rightLabel.setText(rightLblValue)
        self.rightLabel.setAlignment(QtCore.Qt.AlignRight)
        # QVBoxLayout the label above; could use QHBoxLayout for
        # side-by-side
        layout = QtGui.QGridLayout(self)
        
        
        layout.addWidget(self.slider,0,0,3,0)
        
        layout.addWidget(self.leftLabel,2,0)
        layout.addWidget(self.centerLabel,2,1)
        layout.addWidget(self.rightLabel,2,2)
        self.setLayout(layout)
    
    
                                   
if __name__=="__main__":
    import sys
    app=QtGui.QApplication(sys.argv)
    m = QtGui.QMainWindow()
    
    w = SliderWithLabels()
    m.setCentralWidget(w)
    m.show()
    app.exec_()
    